#pragma once
#include <Windows.h>
#include <stdlib.h>
#include <AniContainer.h>
#include <BinContainer.h>
#include <D3dModel.h>
struct ANILIST;

class SaveClientData
{
public:
	SaveClientData(void);
	~SaveClientData(void){}

	virtual void SaveFolderData()
	{
		int i = 0;
		char* fname = FindName();
		CFileFind ffile;
		int itworked = ffile.FindFile(fname);
		if (itworked)
		{
			bool  ismore = true;	
			char buff[256];
			do 
			{
				ismore = ffile.FindNextFile();
				sprintf(buff,"%s",ffile.GetFilePath());
				Save( buff, i++ );
			} 
			while(ismore);
		}
	}
	SDrawElement* GetElement( char* fname );
protected:
	virtual char* FindName() = 0;
	virtual void Save(char* fileName, int index) = 0;
};

class SaveAniData : public SaveClientData
{
protected:	
	virtual char* FindName();
	virtual void Save(char* fileName, int index);
};
class SaveMeshData : public SaveClientData
{
protected:
	virtual char* FindName();
	virtual void Save( char* fileName, int index );
};
class SaveBoneData : public SaveClientData
{
protected:
	virtual char* FindName();
	virtual void Save( char* fileName, int index );
};

class SaveItemData : public SaveClientData
{
public:
	virtual void SaveFolderData();

protected:
	virtual char* FindName();
	virtual char* FindNpcWeapon();
	virtual void Save( char* fileName, int index );		
};

